package com.yanqu.road.server.cmd.activity.hanghai;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.HangHaiActivityProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.hanghai.CrossHangHaiMgr;
import com.yanqu.road.server.manager.union.activitygroup.Cross2UnionActivityGroupMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_HANGHAI_ACTIVITY_GET_UNION_MEMBER_DATA, desc = "获取商会成员数据")
public class CrossGetHangHaiUnionMemberDataCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        HangHaiActivityProto.CrossGetHangHaiUnionMemberDataReqMsg reqMsg = HangHaiActivityProto.CrossGetHangHaiUnionMemberDataReqMsg.parseFrom(packet.getBytes());
        String unionUid = Cross2UnionActivityGroupMgr.getUnionUid(activityId, packet.getPlayerId());
        CrossHangHaiMgr.getActivity(reqMsg.getActivityId(), groupId).getUnionMemberByCmd(packet.getPlayerId(), unionUid, reqMsg.getReq());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
